const tokenKey = 'token'

const adminInfoKey = 'adminInfo' 
/* 处理本地存储的token */
export function getToken(){
    return localStorage.getItem(tokenKey)
}

export function setToken(token){
    return localStorage.setItem(tokenKey,token)
}


export function clearToken(){
    return localStorage.removeItem(tokenKey)
}


/* 处理本地存储的用户信息 */
export function getAdminInfo(){
    return localStorage.getItem(adminInfoKey)
}

export function setAdminInfo(adminInfo){
    return localStorage.setItem(adminInfoKey,adminInfo)
}


export function clearAdminInfo(){
    return localStorage.removeItem(adminInfoKey)
}


/* 清除所有的用户信息 */

export function clearInfo_Token(){
    clearAdminInfo()
    clearToken()
}